package com.lzh.controller;

import com.lzh.common.bean.ResultBean;
import com.lzh.common.controller.BaseController;
import com.lzh.service.CategoryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api("客户分类")
@RestController
@RequestMapping("/api")
public class CategoryController extends BaseController {

    @Autowired
    CategoryService categoryService;

    @ApiOperation("查询客户分类")
    @GetMapping("/category")
    public ResultBean getCategory() {
        List category =  categoryService.   getCategory();
        return success("客户分类",category);
    }
}
